package cn.net.cfss.fgbp.provider.manage.service;

import org.apache.commons.lang.StringUtils;

/**
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2020-2050</p>
 * <p>Company: cfss</p>
 *
 * @author lyg
 * @version 0.0.1
 * @date 2020/12/11 11:42
 * @other 以下修改下及其它信息
 * <p>v0.0.2,lyg,这是示例</p>
 */
public class MyBaseService {
    public String getNewestCode(String code,String begin,String prefix) {
        String num = null;
        if (StringUtils.isBlank(code)) {
            num = begin;
        } else {
            //字符串切割起始位置号
            Integer idenx = 2;
            Integer numInt = Integer.valueOf(code.substring(idenx)) + 1;
            num = String.format("%05d", numInt);
        }
        return prefix + num;
    }
}
